<include file="./admin-header" />

	<link rel="stylesheet" type="text/css" href="{$Think.const.JS_URL}assets/plugins/select2/select2_metro.css" />
	<link rel="stylesheet" type="text/css" href="{$Think.const.JS_URL}assets/plugins/bootstrap-wysihtml5/bootstrap-wysihtml5.css" />
	<link rel="stylesheet" type="text/css" href="{$Think.const.JS_URL}assets/plugins/bootstrap-markdown/css/bootstrap-markdown.min.css">

	<!-- BEGIN PAGE -->  
	<div class="page-content">       
		<!-- BEGIN PAGE HEADER-->   
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN PAGE TITLE & BREADCRUMB-->
				<h3 class="page-title">
					{$Think.lang.text_menu_management} <small>{$Think.lang.text_menu_management_tips_en}</small>
				</h3>
				<ul class="page-breadcrumb breadcrumb">
					<!-- <if condition="$Think.const.ACTION_NAME == 'edit'"> -->
					<li class="btn-group">
						<a href="{:U('add')}"><button type="button" id="add_menu" class="btn blue">
						{$Think.lang.text_menu_add} <i class="fa fa-plus"></i>
						</button></a>
					</li>
					<!-- </if> -->
					<li>
						<i class="fa fa-home"></i>
						<a href="{:U('Index/index')}">{$Think.lang.text_home}</a> 
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="{:U('Config/group')}">{$Think.lang.text_system}</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="{:U('index')}">{$Think.lang.text_menu_management}</a>
						<i class="fa fa-angle-right"></i>
					</li>
					<li>
						<a href="__SELF__">
							<!-- <if condition="$Think.const.ACTION_NAME == 'edit'"> -->{$Think.lang.text_menu_edit}
							<!-- <else /> -->{$Think.lang.text_menu_add}<!-- </if> -->
						</a>
					</li>
				</ul>
				<!-- END PAGE TITLE & BREADCRUMB-->
			</div>
		</div>
		<!-- END PAGE HEADER-->
		<!-- BEGIN PAGE CONTENT-->
		<div class="row">
			<div class="col-md-12">
				<!-- BEGIN VALIDATION STATES-->
				<div class="portlet box blue">
					<div class="portlet-title">
						<div class="caption">
							<i class="fa fa-pencil"></i>
							<!-- <if condition="$Think.const.ACTION_NAME == 'edit'"> -->{$Think.lang.text_menu_edit}
							<!-- <else /> -->{$Think.lang.text_menu_add}<!-- </if> -->
						</div>
						<div class="tools">
							<a href="javascript:;" class="collapse"></a>
							<a href="javascript:;" class="reload"></a>
						</div>
					</div>
					<div class="portlet-body form">
						<!-- BEGIN FORM-->
						<form id="form_sample_2" class="form-horizontal form-bordered" method="post" <if condition="$Think.const.ACTION_NAME == 'edit'">action="{:U('update')}"<else />action="{:U('insert')}"</if>>
						<input type="hidden" name="id" value="{$_GET['id']}" />
							<div class="form-body">
								<div class="form-group">
									<label class="control-label col-md-3">{$Think.lang.text_menu_name}</label>
									<div class="col-md-4">
										<div class="input-icon right">                                       
											<i class="fa"></i>   
											<input type="text" class="form-control" name="title" value="{$title}" <if condition="$Think.const.ACTION_NAME == 'edit'">disabled="disabled"</if> />                                 
										</div>
									</div>
								</div>
								<div class="form-group">
									<label class="control-label col-md-3">{$Think.lang.text_menu_superior}</label>
									<div class="col-md-4">
										<select class="form-control input-medium" name="parentid" class="select2me">
											<option value="0">{$Think.lang.text_menu_top}</option>
											{$memudata}
										</select>
									</div>
								</div>
								<div class="form-group">
									<label class="control-label col-md-3">{$Think.lang.text_menu_link}</label>
									<div class="col-md-4">
										<div class="input-icon right">                                       
											<i class="fa"></i>   
											<input type="text" class="form-control" name="url" value="{$url}" />                                 
										</div>
										<span class="help-block">e.g: Index/index</span>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-3 control-label">{$Think.lang.text_status}</label>
									<div class="col-md-9">
										<div class="radio-list">
											<label class="radio-inline">
												<span>
													<input type="radio" name="status" id="optionsRadios25" value="1" <if condition="$status eq 1">checked="checked"</if> />
												</span>{$Think.lang.text_show}
											</label>
											<label class="radio-inline">
												<span>
													<input type="radio" name="status" id="optionsRadios26" value="0" <if condition="$status eq 0">checked="checked"</if> />
												</span>{$Think.lang.text_hidden}
											</label> 
										</div>
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-3 control-label">{$Think.lang.text_menu_owner}</label>
									<div class="col-md-4">
										<input type="text" class="form-control" name="module" value="Admin" placeholder="Admin" readonly="Readonly">
									</div>
								</div>
								<div class="form-group">
									<label class="col-md-3 control-label">{$Think.lang.text_menu_desc}</label>
									<div class="col-md-4">
										<textarea class="form-control" name="description" rows="3">{$description}</textarea>
									</div>
								</div>
								<div class="form-group">
									<label class="control-label col-md-3">{$Think.lang.button_listorder}</label>
									<div class="col-md-4">
										<div class="input-icon right">                                       
											<i class="fa"></i>   
											<input type="text" class="form-control" name="sort_order" value="{$sort_order}" />                                 
										</div>
									</div>
								</div>
							</div>
							<div class="form-actions fluid">
								<div class="col-md-offset-3 col-md-9">
									<button type="submit" name="dosubmit" class="btn blue"><i class="fa fa-check"></i> {$Think.lang.button_submit}</button>
									<button type="button" class="btn default" onclick="javascript:history.back(-1);">{$Think.lang.button_back} <i class="fa fa-reply"></i></button>                              
								</div>
							</div>
						</form>
						<!-- END FORM-->
					</div>
				</div>
				<!-- END VALIDATION STATES-->
			</div>
		</div>
		<!-- END PAGE CONTENT--> 
	</div>
	<!-- END PAGE -->
	
	<include file="./admin-js" />
	<script>
		jQuery(document).ready(function() {
		   App.init();
		});
	</script>

<include file="./admin-footer" />